package com.crm.system.controller.returnMoney;

import com.crm.common.model.DataResponse;
import com.crm.common.model.DhPageInfo;
import com.crm.common.model.DhResponse;
import com.crm.common.model.Enum.ResponseCodeEnum;
import com.crm.model.qo.returnMoney.ModifyRoyaltyStatusLogQO;
import com.crm.model.vo.returnMoney.ModifyRoyaltyStatusLogVO;
import com.crm.system.service.returnMoney.ModifyRoyaltyStatusLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ Author ：pym
 * @ Date   ：2021/11/26 15:23
 */
@RestController
@RequestMapping("/modifyRoyaltyStatusLog")
public class ModifyRoyaltyStatusLogController {
    @Autowired
    private ModifyRoyaltyStatusLogService modifyRoyaltyStatusLogService;

    /**
     * 财务 - 回款管理 - 到款记录 - “修改回款提成发放状态日志”列表
     * @Author pym
     * @Date  2021/11/26 16:03
     * @param pageIndex -页码
     * @param pageSize -分页大小
     * @param sortName -排序列名字
     * @param sortOrder -排序规则(asc/desc)
     * @param modifyRoyaltyStatusLogQO -筛选条件
     * @return {@link {com.crm.common.model.DataResponse}}
     */
    @PostMapping("/selectModifyRoyaltyStatusLogList")
    private DataResponse selectModifyRoyaltyStatusLogList(@RequestParam(value = "pageIndex", required = true) Integer pageIndex,//页码
                                                          @RequestParam(value = "pageSize", required = true) Integer pageSize,//分页大小
                                                          @RequestParam(value="sortName",required = false) String sortName,//排序列名字
                                                          @RequestParam(value="sortOrder",required = false) String sortOrder,//排序规则(asc/desc)
                                                          ModifyRoyaltyStatusLogQO modifyRoyaltyStatusLogQO//筛选条件
    ){
        DhPageInfo<ModifyRoyaltyStatusLogVO> modifyRoyaltyStatusLogVOList = modifyRoyaltyStatusLogService
                .selectModifyRoyaltyStatusLogList(pageIndex, pageSize, sortName, sortOrder, modifyRoyaltyStatusLogQO);
        return new DhResponse(ResponseCodeEnum.OK.getResponseCode(), modifyRoyaltyStatusLogVOList);
    }

}
